﻿<sdk:ChildWindow x:Class="Apps.Yunwei.Views.PartSelector"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
                 xmlns:local="clr-namespace:Apps.Yunwei.Views"
                 Style="{StaticResource MetroChildWindow}"
                 Title="选择组件" Width="640" Height="400">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="5"/>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" MinHeight="36"/>
                <RowDefinition Height="Auto" MinHeight="36"/>
                <RowDefinition Height="Auto" MinHeight="36"/>
                <RowDefinition Height="Auto" MinHeight="36"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" MinWidth="55"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="路径" Grid.Row="0" Margin="2,6,4,0" VerticalAlignment="Top" TextAlignment="Right"/>
            <TextBlock Text="类库" Grid.Row="1" Margin="2,6,4,0" VerticalAlignment="Top" TextAlignment="Right"/>
            <TextBlock Text="类型" Grid.Row="2" Margin="2,6,4,0" VerticalAlignment="Top" TextAlignment="Right"/>
            <TextBlock Text="参数" Grid.Row="3" Margin="2,6,4,0" VerticalAlignment="Top" TextAlignment="Right"/>

            <ComboBox x:Name="cmbXap" Grid.Row="0" Grid.Column="1"
                      Margin="2,2,0,4" Height="28"
                      DisplayMemberPath="Key"
                      SelectedValuePath="Value"
                      SelectedValue="{Binding URL,Mode=TwoWay}"
                      SelectionChanged="Xap_SelectionChanged"/>

            <ComboBox x:Name="cmbAssembly" Grid.Row="1" Grid.Column="1"
                      Margin="2,2,0,4" Height="28"
                      DisplayMemberPath="Key"
                      SelectedValuePath="Value"
                      SelectedValue="{Binding Arg1,Mode=TwoWay}"
                      SelectionChanged="Assembly_SelectionChanged"/>

            <ComboBox x:Name="cmbClass" Grid.Row="2" Grid.Column="1"
                      Margin="2,2,0,4" Height="28"
                      SelectedItem="{Binding Arg2,Mode=TwoWay}"
                      SelectionChanged="Class_SelectionChanged"/>

            <TextBox Grid.Column="1" Grid.Row="3" Margin="2,2,0,4" Height="28"
                     Text="{Binding Args, Mode=TwoWay, ValidatesOnDataErrors=true}"/>
            <local:ExpressionEditor x:Name="datagrid" Grid.Row="4" Grid.Column="1"/>
        </Grid>
        <Button x:Name="OKButton" Content="确定"
                Click="OKButton_Click" Width="75" Height="23" Margin="0,0,79,0"
                HorizontalAlignment="Right" Grid.Row="2" Cursor="Hand"/>
        <Button x:Name="CancelButton" Content="取消" 
                Click="CancelButton_Click" Width="75" Height="23"
                HorizontalAlignment="Right" Grid.Row="2" Cursor="Hand"/>
    </Grid>
</sdk:ChildWindow>